<?php if($this->pageCount){
    $params = Zend_Controller_Front::getInstance()->getRequest()->getParams();
    unset($params['module']);
    unset($params['controller']);
    unset($params['action']);
    
    foreach($params as $key=>$value)
    {
        if($value=="")
        {
            unset($params[$key]);
        }
    }
?>
<div class="pagination pagination-right">
    <ul>
        <!-- Previous page link -->
        <?php if(isset($this->previous)) {?>
        <li>
            <a rel="<?php echo $this->previous;?>" class="prev" href="<?php echo $this->url(array('page'=>$this->previous));?>">«</a>
        </li>
        <?php }else{?>
        <li class="disabled"><a>«</a></li>
        <?php }?>
        
        <!-- Numbered page link -->
        <?php foreach($this->pagesInRange as $page){?>
            <?php if($page != $this->current){?>
                <li>
                    <a rel="<?php echo $page;?>" href="<?php echo $this->url(array('page'=>$page))?>"><?php echo $page;?></a>
                </li>
            <?php }else{?>
                <li class="active"><a><?php echo $page;?></a></li>
            <?php }?>
        <?php }?>
        
        <!-- Next page link -->
        <?php if(isset($this->next)){?>
            <li>
                <a rel="<?php echo $this->next;?>" class="next" href="<?php echo $this->url(array('page'=>$this->next));?>">»</a>
            </li>
        <?php }else{?>
        <li class="disabled"><a>»</a></li>
        <?php }?>
    </ul>
</div>
<?php }?>